package com.iplay.thezen.proxy;

/**
 * @author dangwu
 * @since 2021/9/3 4:49 下午
 */
public class ProxyUpd implements Subject{
    Subject subject = null;
    public ProxyUpd(int num){
        switch (num){
            case 1: subject = new RealSubject();break;
            case 2: subject = new RealSubjectB();break;
            default:
        }

    }

    @Override
    public void request() {
        System.out.println("proxyUpd exec");
        subject.request();
    }
}
